<?
require("config.php");

$location_status .= "| Delete";
$menuname = NULL;
$menutarget = NULL;

if (NULL!=$action){

	$Query = "DELETE FROM $table WHERE id=$id";
	myQuery($Query);

   header("location:" . $rela_path . "share/msg.php?v=373");

   exit();

}else{

  if (!checkRecord($table,$id)){

	header("location:" . $rela_path . "share/msg.php?v=9002");

	exit();
  
  }

}


$Query = "SELECT 
	code, 
	subject, 
	date, 
	author, 
	details,
    status,
	publish_date 
FROM $table WHERE id=$id LIMIT 1";

$r=myQuery($Query);

$Code=$r[0][0];
$Subject=$r[0][1];
$Date=$r[0][2];
$Author=$r[0][3];
$Details=$r[0][4];
$Status=$r[0][5];
$Online=$r[0][6];
/*
if (!$Settime) {
	$Settime="No";
}else{
	$Settime="Yes";
}
*/

require($rela_path . "inc/header.php");

?>
<form action="" method="post" enctype="multipart/form-data" name="form1">
<input name="action" type="hidden" value="delete">
<input name="id" type="hidden" value="<?print($id)?>">




<table width="95%" border="0" align="center">
  <tr> 
      <td valign="top"> <p><br>
          <br>
          Are you sure to delete this quote  ? 
          <input type="submit" class="button" name="Submit2" value="  Yes  ">
          <input type="button" class="button" name="Submit3" value="  No  " onClick="Redirect('menu.php',1);">
          <br>
          <br>
        <table border="0" cellspacing="5" cellpadding="1">
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td class="tdheader">Code : </td>
            <td><?print($Code)?></td>
          </tr>
          <tr> 
            <td class="tdheader">Subject :</td>
            <td><?echo $Subject?></td>
          </tr>
          <tr>
            <td class="tdheader">Date:</td>
            <td><?print(OutDate($Date))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Author:</td>
            <td><?echo $Author?></td>
          </tr>
          <tr> 
            <td class="tdheader">Publish:</td>
            <td> <?echo $Status?></td>
			 </tr><tr>
			<td class="tdheader">Publish Date:</td>
			<td> <?print(OutDate($Online))?></td>
          </tr>
          <tr> 
            <td class="tdheader">Details : </td>
            <td><?echo $Details?></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        <p>&nbsp;
        <p>&nbsp; 
        <p>&nbsp; </td>

  </tr>
</table>
<br>
<br>
<br>


</form>
<?
require($rela_path . "inc/footer.php");
?>
